cc.Class({
    extends: cc.Component,

    properties: {
        target:cc.Node,
        game:cc.Node
    },

    // use this for initialization
    onLoad: function () {

    },

    onBeginContact: function (contact, selfCollider, otherCollider) {
        let role = this.target.getComponent('role');
        role.speed = 0;
        role.body.angularVelocity = 0;
        //游戏成功
        this.game.getComponent('game').success();
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
